<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="@dimen/place_autocomplete_prediction_height"
    android:orientation="horizontal"
    >

    <include
        layout="@layout/place_autocomplete_progress"
        android:layout_width="@dimen/place_autocomplete_progress_size"
        android:layout_height="@dimen/place_autocomplete_progress_size"
        android:layout_marginLeft="@dimen/place_autocomplete_progress_horizontal_margin"
        android:layout_marginRight="@dimen/place_autocomplete_progress_horizontal_margin"
        android:layout_gravity="center"
        android:visibility="invisible"
        android:layout_centerVertical="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        />

    <!--
        This is an empty view that exists only to add primary text above and secondary text
        below, keeping them centered without using nested layouts.

        We reuse the id "place_autocomplete_separator" in order to avoid generating unnecessary
        ids in the client library.
    -->
    <View
        android:id="@+id/place_autocomplete_separator"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_centerVertical="true"
        />

    <TextView
        android:id="@+id/place_autocomplete_prediction_primary_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="@color/place_autocomplete_prediction_primary_text"
        android:textSize="@dimen/place_autocomplete_prediction_primary_text"
        android:layout_marginLeft="@dimen/place_autocomplete_prediction_horizontal_margin"
        android:layout_marginRight="@dimen/place_autocomplete_prediction_horizontal_margin"
        android:lines="1"
        android:singleLine="true"
        android:ellipsize="end"
        android:layout_toRightOf="@id/place_autocomplete_progress"
        android:layout_toEndOf="@id/place_autocomplete_progress"
        android:layout_above="@id/place_autocomplete_separator"
        android:layout_centerVertical="true"
        />

    <TextView
        android:id="@+id/place_autocomplete_prediction_secondary_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="@color/place_autocomplete_prediction_secondary_text"
        android:textSize="@dimen/place_autocomplete_prediction_secondary_text"
        android:layout_marginLeft="@dimen/place_autocomplete_prediction_horizontal_margin"
        android:layout_marginRight="@dimen/place_autocomplete_prediction_horizontal_margin"
        android:lines="1"
        android:singleLine="true"
        android:ellipsize="end"
        android:layout_toRightOf="@id/place_autocomplete_progress"
        android:layout_toEndOf="@id/place_autocomplete_progress"
        android:layout_below="@id/place_autocomplete_separator"
        />

</RelativeLayout>
